/**
 *  一句话思路：
    算法描述：
    解决所需数据结构+算法：
**/
#include<iostream>
using namespace std;

int main() {
    int s, v, h = 7, m = 50;
    cin >> s >> v;
    int t =  s%v == 0 ? s/v : s/v+1;
    while(t) {
        if(t >= m) {
            t -= m;
            m = 60;
            h = (h+23)%24;
        } else {
            m -= t;
            t = 0;
        }
    }
    if(h < 10) cout << "0";
    cout << h << ":";
    if(m < 10) cout << "0";
    cout << m << endl;
    return 0;
}